import http from '../..';
import { formatQuery } from '/@/libs/utils/format';

const prefix = '/evo/tasks';

/**
 * 获取样本统计
 * @param taskId 任务id
 * @returns
 */
export const getOverview = (taskId: string) => http.get(`${prefix}/${taskId}/results/overview`);

/**
 * 获取基因组覆盖度可选序列
 * @param taskId 任务id
 * @returns
 */
export const getCoverAvailableSeq = (taskId: string, barcodeName: string) =>
  http.get(`${prefix}/${taskId}/results/overview/${barcodeName}/availableSeqs`);

/**
 * 获取指定任务样本bedcov
 * @param taskId 任务id
 * @returns
 */
export const getBedcov = (taskId: string, barcodeName: string, selection: string) =>
  http.get(`${prefix}/${taskId}/results/overview/${barcodeName}?selection=${selection}`);

/**
 * 获取指定任务FastANI
 * @param taskId 任务id
 * @returns
 */
export const getFastANI = (taskId: string) => http.get(`${prefix}/${taskId}/results/fastANI`);

/**
 * 进化树
 * @param taskId 任务id
 * @returns
 */
export const getEvoTree = (taskId: string) => http.get(`${prefix}/${taskId}/results/evoTree`);

/**
 * 获取指定任务核心变异位点统计表
 * @param taskId 任务id
 * @returns
 */
export const getCore = (taskId: string) => http.get(`${prefix}/${taskId}/results/coreMutationStat`);
